home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Suzy B Software 2
/
Suzy B Software CD-ROM 2 (1994).iso
/
txtedtrs
/
tx2cnvt2
/
tx2codes.doc
< prev
Wrap
Text File
|
1995-05-02
|
8KB
|
209 lines
ABOUT THE TX2 FORMAT
This file will describe the complete TX2 format. You can read this
just out of curiousity, or if you want to add TX2 support to your
programs.
All new TX2 files should be level 4. Levels 2 and 3 were used in the
old shareware version of the TX2 File Viewer. Following are the codes
for level 4 files, followed by the changes that were made from levels
2 and 3.
The codes will be listed as hex, preceded with a dolar sign.
Every TX2 file starts with a header. The first byte must be $14. The
second byte indicates the level of the file. Level 4 files use $04.
This is followed by a carriage return and line feed ($0D0A), as every
line should.
Evey line which contains any TX2 code must start with a null ($00).
If not present, the program will ignore any codes that might appear on
that line.
$01 Color 1 (not used very often)
$02 Color 2
$03 Color 3
$04 Bold
$05 Light
$06 Italics
$14 Double Size
$1402 Half Size
$16 Underline
$1E Outline
Each of the above is a toggle. The first time it apears will turn it
on; the next time will turn it off.
Note: If the code for italics ($06) comes before an underline
character, the "_" will not be printed. This is because most people
use this character to represent italics when in plain text mode.
A very important code is $10. This signifies that there are no more
codes on the line, so the program can blit the rest of it very
quickly. This also turns off all of the special effects except
different colors. (Note: the TX2 Editor does not use this code.)
$0F is the ignore code. If found, the program will ignore the rest of
the text on the line, and not print it.
$1102, $1103, $1104, $2002, $2003, and $2004 are codes reserved for
GEnie Lamp magazine. They are for the titles and Quick_Quotes that
appear within this online magzine.
$12 is for a divider. It was designed for GEnie Lamp, but can be used
elsewhere. It is a small design (about 50 pixels wide) meant to
separate sections. It also signifies the end of a line.
$13 is for a line. It is a thick (shadowed in color) line meant to be
used in place of "------------", etc. The first $13 indicates the
start of the line; the second is for the end. Make sure that you end
the line before the next carriage return; otherwise, you can create
problems.
$1C if for a full external picture. It is followed by the number of
the picture to be displayed, using the translation table (see below).
In the text, the program will create a small [** PICTURE **] icon. By
pressing [P], the picture will be called up. (See the section on the
index below for more information.)
$17 is for an integrated picture. This is followed by the number of
the picture to be used, using the translation table. The next code is
the line of the picture to be displayed, also using the translation
table.
That's it for the codes. The translation table is used to number
items without using displayable codes. They are as follows:
1 $02
2 $03
3 $04
4 $05
5 $06
6 $0E
7 $0F
8 $10
9 $11
10 $12
11 $13
12 $14
13 $16
The program only allows for up to 13 of each type of picture.
However, integrated pictures can use more than 13 lines. For numbers
beyond 13, they use $17 plus the table all over again. Simply add the
13 to the next code. For example, $1706 is the code for line #18.
These are all of the codes that would appear within a TX2 file. There
is also a separate index file, which has the same filename, except
with the ".IDX" extension. If contains a list of sections, plus
filenames of pictures to be added to the text.
If there are no pictures, the first line only contains the number of
items in the index. Then, each following line contains the section
name, enclosed in quotation marks (". . ."), followed by a comma,
followed by the line on which the section starts in the file.
If there are pictures, then it is a little more complicated. The
first line must contain the string, "PICS", no quotes. The next line
contains four numbers, separated by commas. They are number of
external pictures, number of integrated pictures, number of clipped
DEGAS pictures, and the last one is reserved for future use. Then,
list the filenames of all of the pictures.
External pictures are full-sized NEO or DEGAS (compressed or
uncompressed) pictures. List these first, if there are any. If there
is more than one picture for different resolutions, use "x" and "y"
(note lowercase) in place of the "1," "2," or "3." An "x" means that
there is a picture for medium and high resolution. A "y" means that
there is a picture for low and high resolution. (see example at end
of section.)
Integrated pictures are those stored in the GFA BASIC PUT format.
These take the extension "PTM" for medium resoltion, and "PTH" for
high resolution. You can also use the "x" to indicate that a picture
is available in more than one resolution.
Clipped DEGAS pictures aren't used much, but they are useful for
compressing integrated pictures. List the filename, followed by the
width and length of the area to be clipped. (The picture must start
at the 0,0 coordinate.) For example, "PICTURE.PCx,100,50".
Here is an example of an actual index file taken from issue #2.23 of
GEnie Lamp magazine. (Comments as shown cannot be included.)
PICS ; required string
8,5,0,0 ; there are eight full pics and five integrated ones
MODEM2.PIy ; this picture works in high and low resolutions
MODEM3.PIy
FIGURE1.PI3 ; this picture only works in high resolution
FIGURE2.PI3
FIGURE3.PI3
FIGURE4.PI3
FIGURE5.PI3
FIGURE6.PI3
GELMP.PTx ; this integrated picture works in high and medium
resolutions
LGSMAIN.PTx
LGSPATH.PTx
LGSINFO.PTx
TECHNOL.PTx
17 ; there are seventeen sections
"TOP",2 ; name of sections is in quotes, followed by the staring
line
"FROM MY DESKTOP",93 ; note: 2 should be added to any starting
line
"SYSOP'S CORNER",182
"HEY MISTER POSTMAN",331
"HUMOR ONLINE",928
"DEALER VIEWPOINT",1045
"MEL'S MANOR",1222
"ATARI_QWIK_TIPS ",1452
"PD_QUICKVIEW ST",1555
"THE ONLINE LIBRARY",1672
"TELETALK ONLINE",1929
"ST ALADDIN ONLINE",2062
"GEnie Online",2314
"HACK'N ATARI",2592
"OFF THE RECORD",2906
"ST ELSEWHERE",2990
"LOG OFF",3067
If you have any questions on anything mentioned in this file, please
let me know at "David Holmes, 13124 Rose Ave., Los Angeles, CA
90066-2223". Or, send E-Mail on GEnie to [D.HOLMES14]. I am willing
to work with you to get TX2 supported in other programs.
ABOUT LEVEL 2 AND 3 FILES
Level 2 and 3 files had a few differences. First, level two files
started with $1402, and level three files started with $140303. The
two are identical in every way except that level three files support
an index, while level two files don't.
In these files, lines with codes either started with $00 or
$0000+another code. The double null signified to search for the
following character. For example,
$00 $00 $06 This is a test of $06_italics$06_$10...
This was replaced in level four files by an automatic search feature.
Also, "lines" starting with $13 did not end with another $13, but
rather a space, $20.
Underline was $07 (but this rang the system bell). Integrated
pictures used $1F. Quick_Quotes used $20, $22, and $23.
The translation table used $0C for six, and everything else was moved
up one. $14 followed by another would be 14 plus the other.
----------
Note: This format is in the public domain. Anyone may write a program
which supports TX2 files to any extent without my permission.
However, I would appreciate it if you would let me know. I am also
available if you need any help understanding how it works.
----------
Copyright (c) 1991 David Holmes
GEnie: D.HOLMES14